package eu.whowie.jast.server.web;

import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;

public class SelectServerClickListener implements ClickListener {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7059436077639203265L;

	private final ServerSelectedListener callback;

	private YastServerUIComponent server;

	public SelectServerClickListener(YastServerUIComponent ui,
			ServerSelectedListener callback) {
		this.server = ui;
		this.callback = callback;
	}

	@Override
	public void buttonClick(ClickEvent event) {
		callback.serverSelected(server);
	}

}
